﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShopINF.aspx.cs" Inherits="sWarranty.WEB.ShopINF" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Src="../UC/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link rel="stylesheet" type="text/css" href="../CSS/table.css" />
    <link rel="stylesheet" type="text/css" href="../CSS/Menu.css" />
    <script src="../JS/jquery-1.8.2.js" type="text/javascript"></script>
    <script src="../JS/Menu.js" type="text/javascript"></script>
    <link href="../JS/chosen-master/chosen/chosen.css" rel="stylesheet" type="text/css" />
    <script src="../JS/chosen-master/chosen/chosen.jquery.js" type="text/javascript"></script>
    <script src="../JS/jquery.stickytableheaders.js" type="text/javascript"></script>
    <script type='text/javascript'>
        $(document).ready(function () {
            //            $("table").stickyTableHeaders();
            //            SetLogger();
        });
        function openPopUp(popUrl, type) {
            var name = 'popUp';
            var appearence = 'dependent=no,menubar=no,resizable=yes,scrollbars=1,' +
                  'status=yes,toolbar=yes,titlebar=no,' +
                  'width=' + window.screen.availWidth * 80 / 100 + ', height=' + window.screen.availHeight * 80 / 100 + ',resizable=yes,center=yes,';
            var openWindow = '';
            if (type == 'open') {
                openWindow = window.open(popUrl, name, appearence);
                openWindow.focus();
            }
            if (type == 'popup') {
                openWindow = window.showModalDialog(popUrl, name, appearence);
                openWindow.focus();
            }

        }
        function OnRowDblClick(sender, eventArgs) {
            var dataItem = $get(eventArgs.get_id());
            var grid = sender;
            var MasterTable = grid.get_masterTableView();
            var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
            var cell = MasterTable.getCellByColumnUniqueName(row, "CUST_CODE");
            var value = cell.innerHTML;
            value = value.replace("<nobr>", "");
            value = value.replace("</nobr>", "");
            value = value.replace("<NOBR>", "");
            value = value.replace("</NOBR>", "");
            openPopUp('ShopREG.aspx?m=1&s=' + value, 'open'); // Redirect the page          
        }   
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ksdjfl" runat="server">
    </asp:ScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <uc1:Header ID="Header1" runat="server" />
    <div class="Mid">
        <div class="Mid1">
            <div class="Search">
                <table>
                    <tr>
                        <td style="background-color: #F7F7F7">
                            Region :
                        </td>
                        <td>
                            <asp:DropDownList ID="dropRegion" Width="100" runat="server" CssClass="chzn-select">
                                <asp:ListItem Value="00" Text="Select"></asp:ListItem>
                                <asp:ListItem Value="01" Text="NORTH"></asp:ListItem>
                                <asp:ListItem Value="02" Text="MIDDLE"></asp:ListItem>
                                <asp:ListItem Value="03" Text="SOUTH"></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td style="background-color: #F7F7F7">
                            BILL To Code :
                        </td>
                        <td>
                            <asp:TextBox ID="txtBillTo" runat="server" Width="100"></asp:TextBox>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td style="background-color: #F7F7F7">
                            Phone No :
                        </td>
                        <td>
                            <asp:TextBox ID="txtCell" runat="server" Width="100"></asp:TextBox>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td>
                        </td>
                    </tr>
                    <tr>
                        <td style="background-color: #F7F7F7">
                            Shop Code :
                        </td>
                        <td>
                            <asp:TextBox ID="txtShopCode" runat="server" Width="100%"></asp:TextBox>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td style="background-color: #F7F7F7">
                            Shop Name :
                        </td>
                        <td>
                            <asp:TextBox ID="txtShopName" runat="server" Width="100%"></asp:TextBox>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td style="background-color: #F7F7F7">
                            Shop Address
                        </td>
                        <td>
                            <asp:TextBox ID="txtAdd" runat="server" Width="100%"></asp:TextBox>
                        </td>
                        <td style='width: 10px'>
                        </td>
                        <td>
                            <asp:Button ID="btnExcel" runat="server" OnClick="btnExcel_Click" Width="80px" CssClass="button Float-right"
                                Text="Export" />
                            <asp:Button ID="btnSearch" runat="server" Width="80px" CssClass="button" Text="Search"
                                OnClick="btnSearch_Click" />
                        </td>
                    </tr>
                </table>
            </div>
            <div id="DataContent">
                <%-- <div>
                    Nội dung bên trái
                </div>--%>
                <div>
                    <div class="TitleCont">
                        Shop Information
                        <asp:Button ID="btnRegisterNew" runat="server" CssClass="button Float-right" Font-Names="Tahoma"
                            Width="80px" Text="Register" />
                        <asp:Button ID="btnImport" runat="server" CssClass="button Float-right" Font-Names="Tahoma"
                            Width="80px" Text="Import file" />
                    </div>
                    <div id="xxx" style="height: 100%; overflow: auto;">
                        <!-- DataGrid Start -->
                        <telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" CellSpacing="0"
                            OnGroupsChanging="RadGrid1_GroupsChanging" CssClass="RadGridCustomClass" GridLines="None"
                            ShowGroupPanel="True" OnNeedDataSource="RadGrid1_NeedDataSource" Skin="Office2007"
                            OnColumnCreated="RadGrid1_ColumnCreated" OnItemDataBound="RadGrid1_ItemDataBound">
                            <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="true" ReorderColumnsOnClient="True">
                                <ClientEvents OnRowDblClick="OnRowDblClick" />
                                <ClientEvents />
                                <Selecting AllowRowSelect="true" />
                            </ClientSettings>
                            <MasterTableView>
                                <PagerStyle AlwaysVisible="True" />
                            </MasterTableView>
                        </telerik:RadGrid>
                    </div>
                </div>
            </div>
            <div class="Clear_both">
            </div>
        </div>
    </div>
    <script type="text/javascript">
        $(".chzn-select").chosen();
    </script>
    </form>
</body>
</html>
